<?php

class articleApp extends Control {
	
	public function index() {
		
		$article_id = isset($_GET['aid'])? intval($_GET['aid']) : 0;
		
		if (!$article_id) {
			$this->show_message("图书信息不存在");
			exit();
		}
		
		$article_mod = &get_model("article");
		$article_info = $article_mod->get_article_info($article_id);
		
		
		$book_mod = &get_model("book");
		$book_info =$book_mod->get_book_info($article_info['book_id']);
		
		
		$breadcrumb = array(
			"{$book_info['book_name']}" => creat_url("c=book&bid=".$book_info['book_id'],'',0,false),
		);
		
		$this->assign('breadcrumb', $breadcrumb);
		$this->assign('article_info', $article_info);
		$this->display();
	}
}